
<div class="page-header">
	<h1>Ogłoszenia</h1>
</div>
<?php echo $this->Session->flash('flash'); ?>

<div class="table-responsive" id="advertisementsTable">
<div id="paginator" style="margin:0px auto; display:block; text-align:right;" >

<?php  
echo $this->Paginator->prev(' << ', array(), null, array('class' => 'prev disabled'));
echo $this->Paginator->numbers(array('separator'=>' '));
echo $this->Paginator->next(' >> ', array(), null, array('class' => 'next disabled'));
?>

</div>
<table class="table table-bordered">
<tbody>
<?php
	foreach ($advertisements as $advert) {
		echo '<tr>';
				
		echo '<td style="width:50px"><a href="/advertisementsPublic/detail'.$advert['Advertisement']['id'].'"><img src="/'.$advert['Advertisement']['image_path'].'" width="150xp" height="150px" /></a></td>';
		
		echo '<td><a style="text-decoration:none" href="/advertisementsPublic/detail/'.$advert['Advertisement']['id'].'"><h3>'.$advert['Advertisement']['title'].'</h3><br/><br/><br/>';
		echo '<p><small>Autor: <b>'.$advert['User']['username'].'</b> , '.$advert['Advertisement']['modified'].'</small></p>';
		
		echo '</tr>';
	}
?>
</tbody>
</table>